/*
* @Author: Administrator
* @Date:   2018-09-09 19:57:58
* @Last Modified by:   Administrator
* @Last Modified time: 2018-09-10 09:29:00
*/
import React from 'react';
import { TopicWrapper, TopicItem, TopicItems } from '../style.js';
import { connect } from 'react-redux';

class Topic extends React.Component {
  render () {
    const { list } = this.props;
  	return (
      <TopicWrapper>
        {
          list.map((item) => {
           return (
                    <TopicItem key={item.get('id')}>
                      <img className="topic-img" src={item.get('imgUrl')} />
                      <div className="topic-contain">{item.get('title')}</div>
                    </TopicItem>
                  )      
             })
        }
        <TopicItems>
          更多热门专题 >
        </TopicItems>
      </TopicWrapper> 
  	)
  } 
}
const mapState = (state) => ({
  list: state.get('home').get('topicList')
});

export default connect(mapState, null)(Topic);